The present disclosure generally relates to the field of communication between devices on a bus. The present disclosure relates more specifically to systems and methods of dynamic addressing of devices communicating on a bus.
A bus is a communications medium carrying data and control signals within a system to which devices can be connected for communications on the bus, such as a distinct set of electrical conductors carrying data and control signals within a system, to which electrical devices can be connected (e.g., connected in parallel) for communications on the bus.
An exemplary bus is the controller area network (“CAN”) bus, which was originally designed as a bus for multiple processors in a vehicle to communicate with each other without a host computer and is now also used in various other applications, areas such as aerospace, maritime, industrial automation, and medical equipment. CAN bus is a serial, electrical bus having a message-based protocol. Devices communicating on a CAN bus are called “nodes.” Any node attached to the CAN bus can communicate with any other node attached to that CAN bus. An exemplary CAN bus message includes: Start of frame (SOF), Message Identifier (MID or “message ID,” which indicates the priority of the message and is used for self-arbitration of simultaneously commenced messages on the CAN bus; the lower the MID value the higher the priority of the message), Remote Transmission Request (RTR), Control field (CONTROL, which specifies the number of bytes of data to follow (0-8)), Data Field (DATA) length 0 to 8 bytes, CRC (field containing a fifteen bit cyclic redundancy check code), Acknowledge Field (ACK), and End of Frame (EOF). Sometimes the MID and RTR are referred to as the “Arbitration Field.” CAN 2.0A has an 11-bit message ID and CAN 2.0B has both 11-bit “standard” and 29-bit bit “extended” message IDs. A “standard” message has an arbitration field consisting of 11 message ID bits and an RTR field. For “standard” messages, an IDE field following the RTR field indicates the message is not “extended.” An “extended” message has an arbitration field of 11 message ID bits, a Substitute Remote Request (SRR) field, an IDE field which indicates an “extended” message, 18 message ID bits, and an RTR field.
Data on the CAN bus is transmitted using dominant and recessive bus bits or states. When a dominant state is set by one node and a recessive state set by another, the bus reflects the dominant state. When multiple nodes begin transmitting at the same time, each of the nodes begin to transmit their identifier field and stop transmitting their message if they detect a dominant state when they attempted to transmit a recessive state, thereby giving priority to the identifier with the first dominant bit. Because of this arbitration system, it is critical that multiple nodes do not attempt to send messages with the same identifier at the same time. To meet this requirement, it is common for devices to have a manually assigned field in the MID, called the node address.